package com.imesne.office.excel;

import com.imesne.office.excel.html.ExcelHtmlWriter;
import com.imesne.office.excel.html.ExcelHtmlWriterConfig;
import com.imesne.office.excel.read.ExcelReader;
import com.imesne.office.excel.read.ExcelReaderConfig;
import com.imesne.office.excel.read.ExcelSaxReader;
import com.imesne.office.excel.write.ExcelSaxWriter;
import com.imesne.office.excel.write.ExcelWriter;
import com.imesne.office.excel.write.ExcelWriterConfig;

/**
 * Created by liyd on 17/6/30.
 */
public final class ExcelKit {

    private ExcelKit() {
    }

    /**
     * 创建excel读取器
     *
     * @return
     */
    public static ExcelReader createReader() {
        return new ExcelReader(new ExcelReaderConfig());
    }

    /**
     * 创建excel读取器
     *
     * @return
     */
    public static ExcelReader createReader(ExcelReaderConfig excelReaderConfig) {
        return new ExcelReader(excelReaderConfig);
    }

    /**
     * 创建excel写入器
     *
     * @return
     */
    public static ExcelWriter createWriter() {
        return new ExcelWriter(new ExcelWriterConfig());
    }

    /**
     * 创建excel写入器
     *
     * @param excelWriterConfig
     * @return
     */
    public static ExcelWriter createWriter(ExcelWriterConfig excelWriterConfig) {
        return new ExcelWriter(excelWriterConfig);
    }

    /**
     * 创建大数据量的excel读取器
     *
     * @return
     */
    public static ExcelSaxReader createSaxReader() {
        return new ExcelSaxReader();
    }

    /**
     * 创建大数据量的excel写入器
     *
     * @return
     */
    public static ExcelSaxWriter createSaxWriter() {
        return new ExcelSaxWriter();
    }

    /**
     * 创建excel html写
     *
     * @return
     */
    public static ExcelHtmlWriter createExcelHtmlWriter() {
        return new ExcelHtmlWriter(new ExcelHtmlWriterConfig());
    }

    /**
     * 创建excel html写
     *
     * @return
     */
    public static ExcelHtmlWriter createExcelHtmlWriter(ExcelHtmlWriterConfig excelHtmlWriterConfig) {
        return new ExcelHtmlWriter(excelHtmlWriterConfig);
    }

}
